package com.dlc.shop.bean.enums;

public enum ShopSupplierModel {

    /**
     * 第三方店铺
     */
    THIRD_PARTY_STORES(0, "第三方店铺"),
    /**
     * 供应商
     */
    SUPPLIER_MODEL(1, "供应商"),
    /**
     * 第三方国外店铺
     */
    THIRD_PARTY_STORES_OVERSEAS(2, "第三方国外店铺")
    ;

    private final Integer num;

    private final String text;

    public Integer value() {
        return num;
    }

    public String text() {
        return text;
    }

    ShopSupplierModel(Integer num, String text) {
        this.num = num;
        this.text = text;
    }

    public static ShopSupplierModel instance(Integer value) {
        ShopSupplierModel[] enums = values();
        for (ShopSupplierModel typeEnum : enums) {
            if (typeEnum.value().equals(value)) {
                return typeEnum;
            }
        }
        return null;
    }
}
